<!DOCTYPE html>
<html>
<head>
	<title>尾数连</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="__STATIC__/zh/css/member-1.css">
	<script type="text/javascript" src="__STATIC__/zh/js/jquery-3.2.1.min.js"></script>
	<link href="__STATIC__/zh/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    	<link href="__STATIC__/zh/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
</head>
<body>
 	 <div class="middle">
    		<div class="head">


    			<div style="width: 15%;float: left;height: 60px;text-align: center;">
		    		<div class="poly">保利</div>
			</div>
			
			<div style="width: 85%;float: left;    margin-top: 38px;position: relative;">
			<div>
				<div  class="arrow-left"></div>
	    			 <div class="memu" >
					<span onclick="aaa()">密码设定</span>
					<span onclick="bbb()">下注状况</span>
					<span onclick="ccc()">账户历史</span>
					<span onclick="ddd()">规则说明</span>
					<span onclick="eee()">会员资料</span>
					<span onclick="fff()">开奖记录</span>
					<span onclick="ggg()">即时开奖</span>
					<span onclick="hhh()">客服</span>
					<span data-toggle="modal" data-target=".bs-example-modal-lg" class="fast">快速金额</span>
					<span onclick="jjj()">登出</span>
				</div>
			</div>
			<div style="clear: both;"></div>

			<div style="position: relative;">
				<div class="arrow-right"></div>
				<div class="memu1">
					<span onclick="kkk()">特码</span>
					<span onclick="lll()">正码</span>
					<span onclick="nnn()">正码特</span>
					<span onclick="mmm()">正码1-6</span>
					<span onclick="ooo()">正码过关</span>
					<span onclick="ppp()">特码生肖色波头尾数</span>
					<span onclick="qqq()">连码</span>
					<span onclick="rrr()">半波</span>
					<span onclick="sss()">正肖总肖七码</span>
					<span onclick="ttt()">连肖</span>
					<span onclick="uuu()">尾数连</span>
					<span onclick="vvv()">多肖</span>
					<span onclick="www()">一肖尾数七色波</span>
					<span onclick="xxx()">全不中</span>
					<span onclick="zzz()">多中一</span>
				</div>
			</div> 
			<div style="clear: both;"></div>
		</div> 
	</div>


	<script type="text/javascript">
			function aaa(){window.location.href="{:url('index/home/passchange')}"}
			function bbb(){window.location.href="{:url('index/home/condition')}"}
			function ccc(){window.location.href="{:url('index/home/history')}"}
			function ddd(){window.location.href="{:url('index/home/instrction')}"}
			function eee(){window.location.href="{:url('index/home/data')}"}
			function fff(){window.location.href="{:url('index/home/record')}"}
			function ggg(){window.location.href="{:url('index/home/lottery')}"}
			function hhh(){window.location.href="{:url('index/home/Customer')}?page=1"}
			function iii(){window.location.href=""}
			function jjj(){window.location.href="{:url('index/home/login1')}"}

			function kkk(){window.location.href="{:url('index/home/member1')}"}
			function lll(){window.location.href="{:url('index/home/member2')}"}
			function nnn(){window.location.href="{:url('index/home/member3')}"}
			function mmm(){window.location.href="{:url('index/home/member4')}"}
			function ooo(){window.location.href="{:url('index/home/member5')}"}
			function ppp(){window.location.href="{:url('index/home/member6')}"}
			function qqq(){window.location.href="{:url('index/home/member7')}"}
			function rrr(){window.location.href="{:url('index/home/member8')}"}
			function sss(){window.location.href="{:url('index/home/member9')}"}
			function ttt(){window.location.href="{:url('index/home/member10')}"}
			function uuu(){window.location.href="{:url('index/home/member11')}"}
			function vvv(){window.location.href="{:url('index/home/member12')}"}
			function www(){window.location.href="{:url('index/home/member13')}"}
			function xxx(){window.location.href="{:url('index/home/member14')}"}
			function zzz(){window.location.href="{:url('index/home/member15')}"}
		</script>

			<div class="left">
			<div style="  width: 100%" >

				<div class="infor">
					<div class="information">
						<div class="username">请检视您的账户</div>
						<table style="width: 100%;background: orange;font-size:14px">
							<thead>
								<tr>
									<td style="text-align: right;">会员账号：</td>
									<td style="text-align: left;">{$user.name}  
										<select name="Characters">
												{eq name="$Characters.c1" value="1"}
												<option value="1">A</option>
												{/eq}
												{eq name="$Characters.c2" value="1"}
												<option value="2">B</option>
												{/eq}
												{eq name="$Characters.c3" value="1"}
												<option value="3">C</option>
												{/eq}
												{eq name="$Characters.c4" value="1"}
												<option value="4">D</option>
												{/eq}
										</select>
									</td>
								</tr>
								<tr>
									<td style="text-align: right;">当前期数：</td>
									<td style="text-align: left;">香港六合彩{$opename}期</td>
								</tr>
								<tr>
									<td style="text-align: right;">信用额度：</td>
									<td style="text-align: left;">{$user.moneys}</td>
								</tr>
								<tr>
									<td style="text-align: right;">已用额度：</td>
									<td style="text-align: left;">{$user.employ}</td>
								</tr>
								<tr>
									<td style="text-align: right;">可用额度：</td>
									<td style="text-align: left;">{$user.m}</td>
								</tr>
								<tr>
									<td colspan="2" style="text-align: center;">请选择下注项目</td>
								</tr>
							</thead>
						</table>
						
						
					</div>
				</div>
					
					<div class="form" style="width: 100%;">
				                        <table style="width: 100%;">
				                            <thead>
				                            <tr>
				                            <td colspan="2">
				                            <div>最近十比交易记录</div>
				                            </td>
				                            <td colspan="2">
						<button class="update">更新</button>
						<button class="shud">x</button>
						</td>
				                            </tr>
				                                <tr class="money">
				                                    <th>时间</th>
				                                    <th>内容</th>
				                                    <th>赔率</th>
				                                    <th>金额</th>
				                                </tr>

				                            </thead>
				                            {foreach $orders as $os}
												<tr class="money" id="money">
													<th>{:date("m-d H:i",$os.times)}</th>
				                                    <th>{$os.bets}</th>
				                                    <th>{$os.rate}</th>
				                                    <th>{$os.price}</th>
												</tr>
											{/foreach}
				                        </table>
					</div>
				</div>
			</div>

			<!-- 模态框 -->
		<div id="modal-overlay"> 
	    	<div class="modal-data">        
		        	<div style="  width: 100%" >
		        		<div style="padding: 10px;">
					<div class="information" style="background-color: rgb(228, 223, 223)">
						<div style="width: 100%;border-bottom: 1px solid gray;    background: rgb(244, 151, 9) ;   font-weight: bold; font-size: 15px;">
							<table style="width: 100%">
								<tbody>
									<tr style="text-align: center;background:orange">
										正码过关&emsp;下注单
									</tr>
								</tbody>
							</table>
						</div>
					</div>

					<div>
						<div style="width: 100%;border-bottom: 1px solid gray; ">
							<table class="tableone">
								<tbody>
									<tr class="tan1">
										<th>账户名称</th>
										<td>{$user.name}</td>
									</tr>
									<tr class="tan1">
										<th>信用额度</th>
										<td>{$user.m}</td>
									</tr>

								</tbody>
							</table>
						</div>

						<div class="tableone" style="border-bottom: 1px solid gray;">
							<div style="    color: rgb(39, 121, 187);font-weight: bold;font-size: 15px;">期数&emsp;<span>{$opename}</span></div>
							<div style="    width: 80%; background: silver;margin: 10px auto;">
								<table class="tabletwo">
									<tbody class="xxx">
									</tbody>
								</table>
								<div class="peilv">
									<span>共</span><span class="totalNum"></span><span>种</span>
								</div>
							</div>

							<div style="width: 100%;border-bottom: 1px solid gray;border-top: 1px solid gray; ">
							<table class="tableone">
								<tbody>
									<tr class="tan1">
										<th>下注金额：</th>
										<td><input type="text" onkeypress="return event.keyCode>=48&&event.keyCode<=57" ng-pattern="/[^a-zA-Z]/" onkeypress="return event.keyCode>=48&&event.keyCode<=57" ng-pattern="/[^a-zA-Z]/" name="" style="width: 80px"></td>
									</tr>
									<tr class="tan2">
										<th>总下注金额：</th>
										<td style="color: red" id="m">0</td>
									</tr>
									<tr class="tan2">
										<th>最低限额：</th>
										<td>2</td>
									</tr>
									<tr class="tan2">
										<th>单注限额：</th>
										<td>50000</td>
									</tr>
									<tr class="tan2">
										<th>单项限额：</th>
										<td>50000</td>
									</tr>
									<tr class="tan2">
										<th>已使用信用：</th>
										<td>0</td>
									</tr>

								</tbody>
							</table>
						</div>
							<table style="width: 100%">
								<tbody>
									<tr style="text-align: center;">
										<td>
											<button class="cencel">取消下注</button>
											<button style="color: green;border:1px solid rgba(0, 188, 212, 0.6);border-radius: 
											3px;" onclick="confirmsingle();">确认下注</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div style="background: orange;font-size: 12px;">更新秒数：<em id="num" style="font-style:normal;color:red;"></em>&ensp;秒</div>
					</div>
				</div>	
			</div>
	    	</div>
	</div>

			<div class="right">
					<div class="anu">
					<div class="anunon"><span class="run">{foreach $announce as $an}{$an.content}{/foreach}</span></div>
					<button onclick="historynews()">历史消息</button>
				</div>

				<div class="bet">
					<div class="tema">
						<span style="color: rgb(30, 90, 120);">尾数连</span>
						<span style="color: white">香港时间:&ensp;<span id="time1" style="color: white;"></span></span>
						<span style="color: white">距截止下注还有   <span class="myDiv"><span id="div1"></span></span></span></span>
					</div>


					<div class="number" style="width: 100%;">
						<div style="width: 100%;">
						<table style="width: 100% ;background: silver;">
							<thead>
								<tr>
									<td>类别</td>
									<td><input type="radio" class="increase" name="aaa" id="95">二尾连</td>
									<td><input type="radio" class="increase" name="aaa" id="96">三尾连</td>
									<td><input type="radio" class="increase" name="aaa" id="97">四尾连</td>
								</tr>
							</thead>
						</table>

					<div id="playone">
						<div style="width: 50%;float: left;">
						<table style="width: 100%;">
							<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>
				                            	{foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="1"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">10. 20. 30. 40</div></td>
				                                   	</tr>
				                                   	   {/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="2"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">01. 11. 21. 31. 41</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="3"}
				                                   	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                  	 	<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">02. 12. 22. 32. 42</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="4"}
				                                  	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">03. 13. 23. 33. 43</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="5"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">04. 14. 24. 34. 44</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}
				                                </tbody>
				                     </table>
				                    	</div>
				                                   
				                     <div style="width: 50%;float: left;">
				                     <table style="width: 100%">
				                     		<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>
				                            	 {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="6"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">05. {$r.ra}. 25. 35. 45</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="7"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">06. 16. 26. 36. 46</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="8"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">07. 17. 27. 37. 47</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="9"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">08. 18. 28. 38. 48</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="1"}
				                            			{eq name="$r.bets" value="10"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                     	 	<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">09. 19. 29. 39. 49</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}
				                                </tbody>
				                     </table>
				                    	</div>
				                    	<div style="clear: both;"></div>

						<div style="width: 100%;">
						<table style="width: 100%;">
							<tbody>
				                                	<tr class="money2" style="    height: 40px;">
									<td colspan="18" style="background:white; ">
										<span class="yesone"  onclick ="betting()" >确认</span>
				                                    			<span  class="noone" >重置</span>
				                                    		</td>
				                                	</tr>
				                            </tbody>
				                      </table>
				               	</div>
					</div>

				               <div id="playtwo">
						<div style="width: 50%;float: left;">
						<table style="width: 100%;">
							<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>
				                            	{foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="1"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">10. 20. 30. 40</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="2"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">01. 11. 21. 31. 41</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="3"}
				                                   	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                  	 	<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">02. 12. 22. 32. 42</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="4"}
				                                  	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">03. 13. 23. 33. 43</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="5"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">04. 14. 24. 34. 44</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}
				                                </tbody>
				                     </table>
				                    	</div>
				                                   
				                     <div style="width: 50%;float: left;">
				                     <table style="width: 100%">
				                     		<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="6"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">05. {$r.ra}. 25. 35. 45</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="7"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">06. 16. 26. 36. 46</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="8"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">07. 17. 27. 37. 47</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="9"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">08. 18. 28. 38. 48</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="2"}
				                            			{eq name="$r.bets" value="10"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                     	 	<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">09. 19. 29. 39. 49</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}

				                                </tbody>
				                     </table>
				                    	</div>
				                    	<div style="clear: both;"></div>

						<div style="width: 100%;">
						<table style="width: 100%;">
							<tbody>
				                                	<tr class="money2" style="    height: 40px;">
									<td colspan="18" style="background:white; ">
										<span class="yesone"  onclick ="betting()" >确认</span>
				                                    			<span  class="noone" >重置</span>
				                                    		</td>
				                                	</tr>
				                            </tbody>
				                      </table>
				               	</div>
				               </div>

				               <div id="playthree">
						<div style="width: 50%;float: left;">
						<table style="width: 100%;">
							<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>
					                                {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="1"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">10. 20. 30. 40</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="2"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">01. 11. 21. 31. 41</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="3"}
				                                   	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                  	 	<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">02. 12. 22. 32. 42</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="4"}
				                                  	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">03. 13. 23. 33. 43</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="5"}
				                                   	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">04. 14. 24. 34. 44</div></td>
				                                   	</tr>
				                                   	{/eq}{/eq}
					                                {/foreach}
				                                </tbody>
				                     </table>
				                    	</div>
				                                   
				                     <div style="width: 50%;float: left;">
				                     <table style="width: 100%">
				                     		<thead>				                                
								<tr class="money1">
				                                    		<th>类别</th>
				                                    		<th>勾选</th>
				                                    		<th>赔率</th>
				                                    		<th>号码</th>
				                                	</tr>
				                            	</thead>
				                            	<tbody>
					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="6"}
				                                	<tr class="money2">
				                                    		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">05. {$r.ra}. 25. 35. 45</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="7"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">06. 16. 26. 36. 46</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="8"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">07. 17. 27. 37. 47</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="9"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                      		<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">08. 18. 28. 38. 48</div></td>
				                                	</tr>
				                                	{/eq}{/eq}
					                                {/foreach}

					                                 {foreach $res as $r}
				                            			{eq name="$r.colums" value="3"}
				                            			{eq name="$r.bets" value="10"}
				                                	<tr class="money2">
				                                     		<td style="background:rgb(225, 140, 45);"><div class="dian">{$r.name}</div></td>
				                                    		<td><input type="checkbox" class="increase" data-id="{$r.bets}" data-colums="{$r.colums}" data-ra="{$r.ra}" name="" onClick="doCheck(this)"></td>
				                                     	 	<td style="color: red;font-weight:bold;background:rgba(230, 225, 225, 0.92);text-align:center;" class="Change">{$r.ra}</td>
				                                   		<td><div style="background: rgba(230,225,225,0.92);    font-weight: bold;font-size: 14px;">09. 19. 29. 39. 49</div></td>
				                                  	</tr>
				                                  	{/eq}{/eq}
					                                {/foreach}
				                                </tbody>
				                     </table>
				                    	</div>
				                    	<div style="clear: both;"></div>

						<div style="width: 100%;">
						<table style="width: 100%;">
							<tbody>
				                                	<tr class="money2" style="    height: 40px;">
									<td colspan="18" style="background:white; ">
										<span class="yesone"  onclick ="betting()" >确认</span>
				                                    			<span  class="noone" >重置</span>
				                                    		</td>
				                                	</tr>
				                            </tbody>
				                      </table>
				               	</div>
				               </div>

				                           
				</div>
			</div>
		</div>
		<div style="clear: both;"></div>

   		<div id="news">
    			<div class="new">
    				<div class="down">x</div>
				<div class="newtime">
					<span>{foreach $announce as $an}{$an.content}{/foreach}</span>
				</div>
				<div class="oldtime">
					
				</div>
    			</div>
    		</div>

		<!-- 全局js -->
		<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
		<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>

		<script type="text/javascript">
			/**
			 * 获得指定数组的所有组合
			 */
			function arrayCombine(targetArr,n) {
			    if(!targetArr || !targetArr.length) {
			        return [];
			    }
			 
			    var len = targetArr.length;
			    var resultArrs = [];
			 
			    // 所有组合
		        var flagArrs = getFlagArrs(len, n);
		        while(flagArrs.length) {
		            var flagArr = flagArrs.shift();
		            var combArr = [];
		            for(var i = 0; i < len; i++) {
		                flagArr[i] && combArr.push(targetArr[i]);
		            }
		            resultArrs.push(combArr);
		        }
			     
			    return resultArrs;
			}
			 
			 
			/**
			 * 获得从m中取n的所有组合
			 */
			function getFlagArrs(m, n) {
			    if(!n || n < 1) {
			        return [];
			    }
			 
			    var resultArrs = [],
			        flagArr = [],
			        isEnd = false,
			        i, j, leftCnt;
			 
			    for (i = 0; i < m; i++) {
			        flagArr[i] = i < n ? 1 : 0;
			    }
			 
			    resultArrs.push(flagArr.concat());
			 
			    while (!isEnd) {
			        leftCnt = 0;
			        for (i = 0; i < m - 1; i++) {
			            if (flagArr[i] == 1 && flagArr[i+1] == 0) {
			                for(j = 0; j < i; j++) {
			                    flagArr[j] = j < leftCnt ? 1 : 0;
			                }
			                flagArr[i] = 0;
			                flagArr[i+1] = 1;
			                var aTmp = flagArr.concat();
			                resultArrs.push(aTmp);
			                if(aTmp.slice(-n).join("").indexOf('0') == -1) {
			                    isEnd = true;
			                }
			                break;
			            }
			            flagArr[i] == 1 && leftCnt++;
			        }
			    }
			    return resultArrs;
			}

		    var dataTime = {$s};
		    //时间戳转dddd-mm-dd HH24:hh:MM:ss
		    var d = new Date(dataTime * 1000);
		    var date = (d.getFullYear()) + "-" + (d.getMonth() + 1) + "-" + (d.getDate()) + "-" + (d.getHours()) + ":" + (d.getMinutes()) + ":" + (d.getSeconds());
		    var startTime = date;
		    console.info(startTime)
		    function count() {
		        var currTime = new Date(); //当前时间  
		        //将xxxx-xx-xx的时间格式，转换为 xxxx/xx/xx的格式  
		        startTime = startTime.replace(/\-/g, "/");
		        var sTime = new Date(startTime);
		        var totalTime = sTime.getTime() - currTime.getTime();
		        var days = parseInt(totalTime / parseInt(1000 * 60 * 60 * 24));
		        totalTime = totalTime % parseInt(1000 * 60 * 60 * 24);
		        var hours = parseInt(totalTime / parseInt(1000 * 60 * 60));
		        totalTime = totalTime % parseInt(1000 * 60 * 60);
		        var minutes = parseInt(totalTime / parseInt(1000 * 60));
		        totalTime = totalTime % parseInt(1000 * 60);
		        var seconds = parseInt(totalTime / parseInt(1000));
		        var time = "";
		        if(days<1&& hours >= 1){
		            time = hours + "时" + minutes + "分" + seconds + "秒";
		        }else if(hours<1&&minutes >= 1){
		            time = minutes + "分" + seconds + "秒";
		        }else{
		             time = seconds + "秒";
		        }
		        document.getElementById("div1").innerHTML = "" + time + " 结束";
		        setTimeout("count()", 1000);
		    }
		    window.onload = count;

		   //投注倒计时
			$(function(){
				var timestart = 43 ; //起始秒数
				var ele = document.getElementById("num");
				setInterval(function(){
				 ele.innerHTML = timestart;
				timestart--;
				if(timestart<0){
					timestart = 43;
					var e1 = document.getElementById('modal-overlay');        
					e1.style.visibility = (e1.style.visibility == "hidden")? "visible" : "hidden";
					$('.left').css('display','block');
					$('#modal-overlay').css('display','none');
					$(":checkbox").attr("checked",false);//取消之前点击的checkbox
					c=0;//将记录的checkbox的个数清零
					localStorage.clear();//清空缓存
					itembet2 = "";
					items = [];
					initilizes=0;
				}
				},1000);
			})
    	</script>

		
		<script type="text/javascript">
			var bet_x;//全局变量,记录是哪个类别
			var c=0; 
			var short;//至少勾选的个数(点击类别获取最少和最多的个数)
			var limit = 10;//最多勾选的个数
			function doCheck(obj) { 
				obj.checked?c++:c--; 
				if(c>limit){ 
				// obj.checked=false; 
				// alert("最多只能勾选"+limit+"个尾连"); 
				// 	c--; 
				}
			} 

			var das1 = [];
			var storage=window.localStorage;
			var items = [];
			var items_1 = [];
			var itembet="" ;
			var itembet2 = [] ;
			var Characters;
			$('input[name=aaa]').click(function(res){
				$(":checkbox").attr("checked",false);
				c=0;
			})
			var initilizes = 0;
			
			// 判断是否给踢线
			window.setInterval(show,5000); 
			function show(){ 
				$.getJSON("{:url('index/login/sta')}",function(result){
					if(result==false) window.location.href="{:url('index/login/logout')}";
				})
			}
			//历史消息模态框
			$('.down').click(function(){
				var e1 = document.getElementById('news');        
				e1.style.visibility = (e1.style.visibility == "hidden")? "visible" : "hidden";
			})

			function historynews(){
				var e1 = document.getElementById('news');        
				e1.style.visibility = (e1.style.visibility == "visible")? "hidden" : "visible";
			}

			//重置
			$(".noone").click(function(){
				$("input[type=checkbox]").attr("checked",false);
			})

			var trArr = [];//列出每一种号码的组合
       		var rateArr = [];//记录每一种组合的赔率
       		var columsArr = [];
       		var z = 0;

			//下注模态框
 				function betting(){
 					var check_num = $("input[type='checkbox']:checked").length;//获取选中checkbox的个数
				   if (check_num < short){
				   	alert("至少勾选"+short+"个尾连");
				   }else{
					  if(initilizes==0){
 						initilizes= 1;
 						var e1 = document.getElementById('modal-overlay');            
				   e1.style.visibility = (e1.style.visibility == "visible")? "hidden" : "visible";
				  $('.left').css('display','none');
				  $('#modal-overlay').css('display','block');
				   $("input:checkbox:checked").map(function(index,elem) {
				   		// console.log(index);
		        		Characters = $('select[name=Characters]').val();
		        		var colums = $(this).attr('data-colums');
		        		// console.log(colums);
			        	var data = {
			        		'andicap':Characters,//盘口
				         	'bet':"11",//目录
				         	'colums':colums,//分目录
				         	'bets':$(elem).attr("data-id"),//球号的号码
				         	// 'betx':$(elem).parent().parent().parent().parent().find(".money3").find("span").html(),//正码
				         	'num':$(elem).parent().parent().find(".dian").html(),//号码
				         	'rate':$(elem).attr("data-ra")//赔率
			        	}
			        	items.push(data);
			        	// console.log(items);
			        });

				    if (type == 1){
				    	for (var i=0; i<items.length; i++){
					    	for (var j=i+1; j<items.length; j++){
					    		trArr[z] = items[i]["num"]+','+items[j]["num"];
					    		itembet2[z] = items[i]["bets"]+','+items[j]["bets"];
					    		columsArr[z] = items[i]["colums"];
			       				if (items[i]["rate"] > items[j]["rate"]){
			       					rateArr[z] = items[i]["rate"];
			       				}else{
			       					rateArr[z] = items[j]["rate"];
			       				}
			       				z++;
					    	}
					    }
				    }

				    if (type == 2){
				    	for (var i=0; i<items.length; i++){
			       			for (var j=i+1; j<items.length; j++){
			       				for (var k=j+1; k<items.length; k++){
			       					trArr[z] = items[i]["num"]+','+items[j]["num"]+','+items[k]["num"];
			       					itembet2[z] = items[i]["bets"]+','+items[j]["bets"]+','+items[k]["bets"];
			       					columsArr[z] = items[i]["colums"];
			       					if (items[i]["rate"] > items[j]["rate"]){
				       					rateArr[z] = items[i]["rate"];
				       				}else{
				       					rateArr[z] = items[j]["rate"];
				       				}
				       				if (rateArr[z] > items[k]["rate"]){
				       					rateArr[z] = rateArr[z];
				       				}else{
				       					rateArr[z] = items[k]["rate"];
				       				} 
			       					z++;
			       				}
			       			}
			       		}
				    }

				    if (type == 3){
				    	for (var i=0; i<items.length; i++){
			       			for (var j=i+1; j<items.length; j++){
			       				for (var k=j+1; k<items.length; k++){
			       					for (var l=k+1; l<items.length; l++){
			       						trArr[z] = items[i]["num"]+','+items[j]["num"]+','+items[k]["num"]+','+items[l]["num"];
			       						itembet2[z] = items[i]["bets"]+','+items[j]["bets"]+','+items[k]["bets"]+','+items[l]["bets"];
			       						columsArr[z] = items[i]["colums"];
			       						if (items[i]["rate"] > items[j]["rate"]){
					       					rateArr[z] = items[i]["rate"];
					       				}else{
					       					rateArr[z] = items[j]["rate"];
					       				}
					       				if (rateArr[z] > items[k]["rate"]){
					       					rateArr[z] = rateArr[z];
					       				}else{
					       					rateArr[z] = items[k]["rate"];
					       				} 
					       				if (rateArr[z] > items[l]["rate"]){
					       					rateArr[z] = rateArr[z];
					       				}else{
					       					rateArr[z] = items[l]["rate"];
					       				} 
			       						z++;
			       					}
			       				}
			       			}
			       		}
				    }
				    // console.log(trArr);
				    // console.log(trArr.length);

			        // //点击发送之前先要清空注单的组合和种数
		       		$(".xxx").html("");
		       		$(".peilv").html("");
		       		// console.log(rateArr)
		       		for (var i=0; i<trArr.length; i++){
		       			$(".xxx").append('<tr><td class="x1">'+bet_x+'</td><td></td><td class="x2">'+trArr[i]+'</td><td class="x3"><span>'+rateArr[i]+'</span></td></tr>');
		       		}
		       		$(".peilv").append("<span>共"+trArr.length+"种</span>")

			        itembet=(itembet.substring(itembet.length-1)==',')?itembet.substring(0,itembet.length-1):itembet;
			        //添加模板
		        	//算出总的赔率
		        	var rate = 1;
		        	var betx ;

					for (var i = 0; i < trArr.length ; i++) {
		        		var das = {
		        			'andicap':Characters,//盘口
				         	'bet':"11",//目录
				         	'colums':columsArr[i],//分目录
				         	'bets':itembet2[i],
				         	'rate':rateArr[i]
		        		}
		        		das = JSON.stringify(das);
		        		das1[i] = das;
					    storage.setItem("das",das1);
		        	}

		        	console.log(das)
 
		        	var check_num = $("input[type='checkbox']:checked").length;//获取选中checkbox的个数
		        	var topNum = 10;//10个尾数,排列组合的底数为10
		        	var total = countNum(short,topNum);//返回组数
		        	// $(".totalNum").html(arraylength1);
		        	$(".xxx").find(".x1").html(bet_x);
		        	// items = [];
		        	$("input[type='text']").val("");//点击确认按钮之后,下注的金额清零	
		      		$("#m").html("");//可赢金额也清零
 					}
				   }
			}

			//下注金额失去焦点
        	$("input[type='text']").blur(function(){
        		var money = $(this).val();
        		var totalMoney = parseFloat(trArr.length) * money;
        		$("#m").html(totalMoney);
        		var dats = storage.getItem("das");
        		for (var i=0; i<das1.length; i++){
        			das1[i] = JSON.parse(das1[i]);
        			das1[i]["price"] = money;
        		}
        		// storage.setItem("das",das1);
        		console.log(das1);
        		// console.log(dats);
        		// dass = JSON.parse(das1);
    //     		console.log(dass)
    //     		money = parseFloat(money);
    //     		dass['price'] = money;
        		dass = JSON.stringify(das1);
				storage.setItem("das",dass);
        	})

			//确认下注的接口
        	function confirmsingle(){
				var dats = storage.getItem("das");
				localStorage.clear();
				fals=1;
				// 确认下注
				console.log(dats);
				$.post('{:url("index/Uploads/uplaodszt")}',{data:dats},function(res){
					if(res==1){
						alert("订单列表为空不能下注");
						document.location.reload();
					}else if(res==2){
						alert('订单最低限额不能低于2');
						document.location.reload();
					}else if(res==0){
						alert('下注失败，余额不足');
						document.location.reload();
					}else if(res==8){
						alert('下注失败,不能投注');
						document.location.reload();
					}
					
					if(res=="success"){
						var e11 = document.getElementById('modal-overlay');        
						e11.style.visibility = (e11.style.visibility == "hidden")? "visible" : "hidden";
						$('.left').css('display','block');
						alert('下注成功');
						document.location.reload();
					}
				})
			} 

        	
				
			$('.cencel').click(function(){
				var e1 = document.getElementById('modal-overlay');        
				e1.style.visibility = (e1.style.visibility == "hidden")? "visible" : "hidden";
				$('.left').css('display','block');
				$('#modal-overlay').css('display','none');
				initilizes = 0;//点击取消下注之后恢复发送按钮的点击功能
				$(":checkbox").attr("checked",false);//取消之前点击的checkbox
				c=0;//将记录的checkbox的个数清零
				localStorage.clear();//清空缓存
				itembet = "";
				itembet2 = [];
				items = [];
				$(".xxx").html("");
				trArr.splice(0,trArr.length);
			})

			//快速选择框缩进
			        var flag =false
			        $('#lol').click(function(){
			          if(flag){
			            $('.last').animate({    
			              'right':'0px'
			            },500)
			            flag = false
			          }else{
			            $('.last').animate({
			              'right':'-300px'
			            },500)
			            flag = true
			          }
			            })
			            $(function(){
			            	$('#lol').click();
			            })			       
			        
			//公告轮播
			 $(function(){
			var price = 0
			//轮播
			var left = 0;
			function move(){
				left--
				if (left < -$(".run").width()) {
					left = 0
				}
				$(".run").css("left",left+"px")
			}
			setInterval(move,40)
		})
		</script>

		<script type="text/javascript">
		//实时时间
		function mytime(){
		        var a = new Date();
		        var b = a.toLocaleTimeString();
		        var c = a.toLocaleDateString();
		        document.getElementById("time1").innerHTML = c+"&nbsp"+b;
		        }
		    setInterval(function() {mytime()},1000);

		//点击改变背景颜色		

			 $(".Change").click(function(){
		             	$(this).css("background-color","orange");//设置点击td的颜色
		             })
		</script>

		<script type="text/javascript">
		$(function() {
    			$("#95").trigger("click");//触发button的click事件
		});

		$('#95').click(function(){
			$("#playtwo").css("display","none");$("#playthree").css("display","none");$("#playone").css("display","block");
		});
		$('#96').click(function(){
			$("#playone").css("display","none");$("#playthree").css("display","none");$("#playtwo").css("display","block");
		});
		$('#97').click(function(){
			$("#playone").css("display","none");$("#playthree").css("display","block");$("#playtwo").css("display","none");
		});

		//计算组合数的方法 n是总数,m是取几
        function factorial(n){
		    return n > 1 ? n * factorial(n-1) : 1;
		}		
		
		// console.log(factorial(10));
		function countNum(m,n){ 
			var dec = n-m;
			var total = (factorial(n)) / (factorial(dec) * factorial(m));
			// console.log(total);
			return total;
		}

		var down_num = 0;
		//点击确定是几中一	
		var type;
		
		$("input[type='radio']").click(function(){
			var input_id = $(this).attr("id");
			if (input_id == 95){
				short = 2;
				limit = 2;
				bet_x = "二尾连";
				type = 1;
			} 
			if (input_id == 96){
				short = 3;
				limit = 3;
				bet_x = "三尾连";
				type = 2;
			} 
			if (input_id == 97){
				short = 4;
				limit = 4;
				bet_x = "四尾连";
				type = 3;
			}

			// console.log(down_num)
		})
		</script>
	</div>
	</div> 
</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>